/**
 * 
 */
package de.cbf.cam.map2d.shapes;

import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Display;

/**
 * @author Stefan Alter
 *
 */
public class ShapeTerrainTreeFir extends Shape {
	int trunkDiameter = 10;
	int treetopDiamater = 30;
	
	/**
	 * @param position
	 */
	public ShapeTerrainTreeFir(Point position) {
		super(position);	
	}

	@Override
	public void drawCollisionFrame(GC gc, Rectangle clientArea) {
		
	}
	
	@Override
	public void drawObject(GC gc, Rectangle clientArea) {
		//tree top
		gc.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GREEN));
		gc.fillOval(position.x, position.y,treetopDiamater,treetopDiamater);
		
		//trunk		
		gc.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GRAY));
		gc.fillOval(position.x+treetopDiamater/2-trunkDiameter/2, 
					position.y+treetopDiamater/2-trunkDiameter/2,
					trunkDiameter,
					trunkDiameter);
	}
}
